import request from '@/utils/request'

// 查询用车申请管理列表
export function listCarrequest(query) {
  return request({
    url: '/lh/carrequest/list',
    method: 'get',
    params: query
  })
}

// 查询用车申请管理详细
export function getCarrequest(requestId) {
  return request({
    url: '/lh/carrequest/' + requestId,
    method: 'get'
  })
}

// 新增用车申请管理
export function addCarrequest(data) {
  return request({
    url: '/lh/carrequest',
    method: 'post',
    data: data
  })
}

// 修改用车申请管理
export function updateCarrequest(data) {
  return request({
    url: '/lh/carrequest',
    method: 'put',
    data: data
  })
}

// 删除用车申请管理
export function delCarrequest(requestId) {
  return request({
    url: '/lh/carrequest/' + requestId,
    method: 'delete'
  })
}

//提交学生申请
export function submitlhcarrequest(requestId){
  return request({
    url: '/lh/carrequest/submitlhcarrequest/' + requestId,
    method: 'get'
  })
}

//查询未完成车辆申请
export function lhcarrequestno(query){
  return request({
    url: '/lh/carrequest/nolist',
    method: 'get',
    params:query
  })
}


// 查询学生信息详细和批注
export function getcarrequestComment(requestId) {
  return request({
    url: '/lh/carrequest/getcarrequestComment/' + requestId,
    method: 'get'
  })
}

// 审批车辆申请信息
export function a(data) {
  return request({
    url: '/lh/carrequest/editapprove',
    method: 'post',
    data: data
  })
}
// 查询完成审批学生信息列表
export function fin(query) {
  return request({
    url: '/lh/carrequest/listFinished',
    method: 'get',
    params: query
  })

}
  //查询车辆使用数据
export function listReport(date){
    return request({
      url:'/lh/carrequest/listreport',
      method:'get',
      date:date
    })
  }
